Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

723
Vistas
Easiest way to "port" a Visual Studio C++ project to compile on Linux?

Have been developing a Visual Studio (2012) C++ project and wondered what would be the most convenient way of being able to copy it over to Linux so that I could re-compile the whole project there? Assume the C++ is platform-independent.

Would it be a case of copying all the .h and .cpp files manually in to one folder, copy that folder to Linux and then somehow creating a script (makefile?) which controls how the files are compiled? I'm not too sure if a makefile is what I require- but any mechanism so that I can compile the whole project from one command on the terminal?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

For the physical part, the easiest solution is to just grab the sources from your Version Control System. That will take care of the \r\n -> \n translation in your .cpp and .h files.

On the linux side, pretty much any build tool is superior to raw make. make is really the assembly language of build systems; your tool might produce a makefile as an intermediary but don't try to maintain that.

over 4 years ago · Santiago Trujillo Denunciar

0

Yes, copy the files (or as @MSalters says - checkout a fresh copy) then construct an alternative .vcxproj for the Linux build tools. Note that the Visual Studio project file is really just a very fancy type of makefile.

A makefile at its simplest is just a list of files (or file types even) and a command for running on them. Once you have that written up, building is as simple as running MSBuild against a .sln file.

So you need to decide which build system to use on Linux - there's CMake which is a makefile-generator, and several other systems available.

Someone has made a tool that parses the VS project file and can generate a makefile from it, but it doesn't support VS2012 (you can fix this though, contribute)

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda